package com.shujia.day17;

import java.util.function.BiFunction;

public class Code14LambdaFunction {
    public static void main(String[] args) {


        /*
            @FunctionalInterface
            public interface BiFunction<T,U,R>{
                        R apply(T t, U u)
            }

         */

        BiFunction<Double, Double, Double> fun = (x, y) -> Math.max(x, y);
        System.out.println(fun.apply(1.5, 22.2));

        System.out.println("--------------------------------------------------");

        BiFunction<Double,Double,Double> fun2 = Math::max;
        System.out.println(fun2.apply(12.34,12.11));

    }
}
